﻿using WeDonekRpc.SqlSugar.VirtualQuery;

namespace Basic.UserFormService.Model
{
    public class CensusTableBody
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 页面ID
        /// </summary>
        public long PageId { get; set; }

        /// <summary>
        /// 表单ID
        /// </summary>
        public long FormId { get; set; }

        /// <summary>
        /// 查询条件
        /// </summary>
        public QueryStruct Query { get; set; }

        public Dictionary<long, ColTable> Cols { get; set; }

        public string[] MergeCol { get; set; }

        public PageCensusColumn[] CensusCol { get; set; }

        public PageColTemplate[] Columns { get; set; }
        public PageRowTrunCol RowTrunCol { get; set; }

        public CensusTableBody Clone ()
        {
            return new CensusTableBody
            {
                Cols = this.Cols,
                FormId = this.FormId,
                CensusCol = this.CensusCol,
                Columns = this.Columns,
                RowTrunCol = this.RowTrunCol,
                MergeCol = this.MergeCol,
                Id = this.Id,
                PageId = this.PageId,
                Query = this.Query.Clone()
            };
        }
    }

}
